home *** CD-ROM | disk | FTP | other *** search
/ The Game Master (3rd Edition) / The Game Master 3rd edition.iso / files / demo_vga / utilvga1 / vgacap.doc < prev    next >
Encoding:
Text File  |  1988-03-31  |  10.2 KB  |  216 lines

  1.                VGACAP Copr.(c) 1988 Lawrence Gozum & Marvin Gozum
  2.                ──────────────────────────────────────────────────
  3.  
  4.                                 User manual
  5.  
  6.     DISCLAIMER
  7.  
  8.     This  product  is distributed AS IS.  The authors specifically disclaim
  9.     all  warranties  ,expressed  or implied, including ,but not limited to,
  10.     implied  warranties  of  merchantability  and  fitness for a particular
  11.     purpose  with respect to defects in the diskette and documentation, and
  12.     program  license  granted  herein,  in particular, and without limiting
  13.     operation  of  the  program  license  with  respect  to  any particular
  14.     application  use  or  purpose.  In no event shall the authors be liable
  15.     for  any  loss  of  profit or any other commercial damage including but
  16.     not limited to special,incidental, consequential or other damages. 
  17.  
  18.  
  19.     LICENSING AGREEMENT
  20.  
  21.     You  may  use  this program on a TRIAL BASIS only;  this means that you
  22.     may  freely  evaluate  the  usefulness of this program for a reasonable
  23.     period.    Should  you find this program useful, you must register (see
  24.     last  section  of  this  manual.      You  will then be provided with a
  25.     personalized  copy  of  this  utility,  any  newsletters and the latest
  26.     release of VGACAD (VGA Computer Assisted Design).
  27.  
  28.     You  may  freely  distribute  copies  of this program in its UNMODIFIED
  29.     state  provided  you do not include it in other software packages, with
  30.     the  exception  of distributing it as part of a bundle of Public Domain
  31.     or  shareware  programs  on a single diskette.  In addition you may not
  32.     charge  more that $3.50 for copying and/or distributing this program in
  33.     the absence of any recognized Users Group guidelines.
  34.  
  35.  
  36.     INTRODUCTION
  37.  
  38.     VGA  (Video Graphics Array) is now the de facto video graphics standard
  39.     in  the  IBM  PS/2  series  (Model  50,  60 and 80).  MCGA (Multi-Color
  40.     Graphics  Array)  is  supported by Model 30; I'm not sure what Model 25
  41.     supports.    Although  VGA has a 640x480 pixel mode, it only supports a
  42.     maximum  of 16 colors - ala EGA (Enhanced Graphics Adaptor).  The  MCGA
  43.     256  color  mode  with  a  resolution  of 320x200 pixels provides near-
  44.     photographic   quality  as  well  as  maintains  a  broad  spectrum  of
  45.     compatibility  with  the  new  PS/2  machines  since it not only is the
  46.     lowest  common  denominator (in graphic modes) but it provides the most
  47.     astounding results.
  48.  
  49.  
  50.     WHAT IS VGACAP ?
  51.  
  52.     VGACAP  is  a  terminate-stay-resident (TSR) utility that allows you to
  53.     capture  the  256  register palette and screen in the 320x200x256 color
  54.     mode  and  save both the palette and screen in "Bloadable" formats.  It
  55.     combines  the  features  of  two releases by the authors - VGASCRSV and
  56.     VGAPALSV  -  into one TSR.  VGACAP is also very well behaved and can be
  57.     called almost anytime.
  58.  
  59.     VGACAP's   main  purpose  is  to  capture  and  save  the  pictures  of
  60.     commercial  and shareware viewing programs as well as painting/graphics
  61.     and CAD programs available now and in the future.
  62.  
  63.     The  palettes  of  some  commercial  paint  programs  set  the  palette
  64.     registers  in  peculiar  configurations  such as PC Paintbrush by ZSoft
  65.     Corporation  (I  think  its  due  to  the  way they have set their file
  66.     format);  for  this  reason, it is important to capture the palettes as
  67.     well  as  the  picture/screen  since  you  will  end  up with a garbled
  68.     image.    VGAGIF  (a  shareware program by Michael Vigneau) is a viewer
  69.     for  Compuserve's  GIF  (Graphics  Interchange  Format);  here you will
  70.     notice that virtually every picture uses a different palette.
  71.  
  72.     VGACAD  (one  of  the  first  256  color  paint/CAD  shareware programs
  73.     distributed  in  the  Public domain) will load the captured palette, as
  74.     soon  as  you  rename the files to follow the *.plt extension.  You can
  75.     use  those  palettes  in your program.  You will find this particularly
  76.     useful in trying to get all those shades that make flesh tones real !
  77.  
  78.  
  79.     HOW TO USE VGACAP
  80.  
  81.     Simply  run  VGACAP  before  entering  your  painting/CAD  or digitized
  82.     picture  viewer.  After it is loaded,  press <ALT-F10> while you are in
  83.     your  viewing  or  drawing/paint/CAD  program  and your current palette
  84.     will  be  saved  to  your  default  directory and drive in the standard
  85.     Bsave format for all BASIC programs.
  86.  
  87.     The  first  time  you  run  the  program  it  will save your screen and
  88.     palette  to  MCAGSCRN.000  and MCGAPLET.000 respectively.  It will then
  89.     increase  both  extensions  up  to  .999.    If  VGACAP continues to be
  90.     resident,  the  latest  file  number will be incremented, regardless of
  91.     the screens and palettes captured in the default directory or drive. 
  92.  
  93.     If  there  is  an  existing  MCGASCRN.xxx or MCGAPLET.xxx file, then it
  94.     will  increment  to  the  next higher number.  This can be confusing if
  95.     you  keep  the  captured files without renaming them since you can have
  96.     unmatched  extensions referring to the same picture.  That is all there
  97.     is  to  it.    You can use your favorite memory managers to remove this
  98.     TSR or reboot if you want to release it from memory.
  99.  
  100.  
  101.     REQUIREMENTS
  102.  
  103.     You  MUST have a VGA or MCGA adaptor (at least BIOS compatible) present
  104.     and  an  analog  monitor  as  well.  This TSR uses less than 2K of your
  105.     available memory (quite insignificant) !
  106.  
  107.     When  in  DOS  or  using a picture viewer (e.g., VGAGIF) or application
  108.     which  requires  a keypress to continue, it is necessary to hit any key
  109.     or  a  specified  key  (e.g.,  spacebar  or  return)  after hitting the
  110.     'HOTKEY' before VGACAP saves the screen and palette.
  111.  
  112.  
  113.     BLOADING the screen from BASIC
  114.  
  115.     The  following  lines  will  load  one  of  the  captured  screens from
  116.     QuickBASIC 4!
  117.  
  118.  
  119.     SCREEN 13:                           'init MCGA 256 color mode
  120.     DEF SEG = &HA000:                    'point data segment to
  121.                                          'screen buffer A0000H
  122.     BLOAD "MCGASCRN.000", 0:             'load the screen
  123.     DEF SEG :                            'restore data segment
  124.  
  125.  
  126.     If  you  are  using  QuickBASIC  1.0,  2.0  or  3.0,    I have included
  127.     VGAMODE.obj  which  is  an  object file created with MASM 4.0 which you
  128.     can include in your UserLib.exe thorough BUILDLIB.exe. 
  129.  
  130.     VGAMODE  is  a  BIOS  compatible  assembly routine which you can use to
  131.     call  the  more  exotic graphic modes of your compatible VGA card (e.g.
  132.     800x560x16  color  mode  of  ATI's  VGA VIP and EGA Wonder); if you are
  133.     using one then check your user manual for the correct hex codes.
  134.  
  135.  
  136.     USAGE:  CALL VGAMODE(&H13):          'MCGA 256 color mode
  137.      or Call VGAMODE(mode%):         'where mode is an integer that
  138.                                          'corresponds to the videomode
  139.                                          'after translating it from HEX
  140.  
  141.  
  142.     The following lines will perform just as well as the listing above.
  143.  
  144.  
  145.     CALL VGAMODE(&H13):                  'init MCGA 256 color mode
  146.     DEF SEG = &HA000:                    'point data segment to
  147.                                          'screen buffer A0000H
  148.     BLOAD "MCGASCRN.000", 0:             'load the screen
  149.     DEF SEG :                            'restore data segment
  150.  
  151.  
  152.     As  a  matter  of  convention,    if  you are using VGACAD,  you should
  153.     rename  your capture screens with the .BLD extension (e.g., MYPICT.BLD)
  154.     to load them automatically in the program.
  155.  
  156.  
  157.     BLOADING the Palette from BASIC
  158.  
  159.     If  you  are  using  QuickBASIC  (any  version from 1.0 to 4.0), I have
  160.     included  WRITEPAL.obj,  which  is, also a VGA BIOS routines written in
  161.     assembly,   that   you   can   include   in  your  UserLib.exe  through
  162.     BUILDLIB.exe (v3.0 and lower) or LINK (v4.0).
  163.  
  164.  
  165.     WRITEPAL  is also a BIOS compatible assembly routine that writes to 256
  166.     palette  registers.    Although  its  main purpose is to facilitate the
  167.     overriding  of  the  VGA  or  MCGA  standard  palette,  since  it is an
  168.     all-purpose  BIOS  routine  it will facilitate changing the palettes of
  169.     more  exotic  screen  modes  such  as  the 640x480x256 color screens of
  170.     IBM's  8514/A  adaptor.  This function is similar to "PALETTE USING" in
  171.     QuickBASIC except for the advantages mentioned above.
  172.  
  173.          USAGE:  Call WritePal (Dseg%,Offset%)
  174.  
  175.          WHERE:  Dseg%  =result of VARSEG for array storage
  176.                  Offset%=result of VARPTR for array storage
  177.  
  178.     The following lines illustrate its use.
  179.  
  180.  
  181.          REM: Example Routine
  182.  
  183.          DIM UserPal%(769):               ' 256 colors x 3 registers=768
  184.                                          : ' registers= red grn blu
  185.          Dseg% = VARSEG(UserPal(1)):      ' get data segment
  186.          Offset% = VARPTR(UserPal(1)):    ' get offset
  187.          DEF SEG = Dseg%:                 ' override data segment
  188.          BLOAD "MCGAPLET.000", Offset%:   ' bload in correct offset
  189.          DEF SEG                         ;' restore data segment
  190.          CALL WritePal(Dseg%, Offset%)
  191.  
  192.  
  193.     USING VGABLD
  194.  
  195.     You  need  not  go through the tedium of writing your own programs just
  196.     to  view  your  captured  pictures.    VGABLD  will  load a picture for
  197.     viewing,  superfast  !   Your captured screen and palette MUST have the
  198.     .BLD  and  .PLT  extensions  respectively  for  the  same picture.  For
  199.     example,  if you captured the picture LYNNEA.GIF using VGAGIF, you will
  200.     have,  at  the  start,  MCGASCRN.000  and  MCGAPLET.000  which you must
  201.     rename  as  LYNNEA.BLD  and  LYNNEA.PLT  respectively.    Type  "VGABLD
  202.     LYNNEA " and your picture is up in a flash."
  203.  
  204.  
  205.     Registration
  206.  
  207.     Registration  entitles  you to the latest update of VGACAP, newsletters
  208.     when  available,  and  the latest version of VGACAD.  Send registration
  209.     form and a $8.95 check made payable to:
  210.  
  211.                                Marvin Gozum
  212.                       2 Independence Place Apt. 303-2
  213.                             6th & Locust Street
  214.                           Philadelphia, PA 19106
  215.  
  216.